import * as echarts from 'echarts'

export const pileBarOptions =  {
  grid: {
    left: '0%',
    top: '12%',
    right: '0%',
    bottom: '4',
    containLabel: true
  },
  legend: {
    show: false,
    data: []
  },
  // color: [
  //   "#ede563",
  //   "#fd7802",
  //   "#fc3846",
  //   "#f02899",
  //   "#b62ebf",
  //   "#8039b2",
  //   "#5249a8",
  //   "#0083cf",
  //   "#00b9e7",
  //   "#35d5c0",
  //   "#00ae29",
  //   "#abcd0e",
  // ]
  xAxis: {
    type: 'category',
    data: [],
    axisLine: {
      show: true,
      lineStyle: {
        color: '#3e4753'
      }
    },
    axisLabel: {
      fontSize: 10,
      interval: 0
    },
    axisTick: {show: false},
  },
  yAxis: [{
    data: [],
    type: 'value',
    // splitNumber: 3,
    splitLine: {
      show: true,
      lineStyle: {
        color: '#3e4753',
        type: 'dashed'
      }
    },
    axisLine: {show: true},
    axisLabel: {
      show: true,
    },
    axisTick: {show: false},
  }],
}
export const pileBarSeriesItem =  {
  // markLine: {
  //   lineStyle: {
  //     color: "#f6a338"
  //   },
  //   silent: true,
  //   symbolSize: 10,
  //   data: [
  //     {name: "警戒线", type:'average'}
  //   ]
  // },
  showBackground: true,
  itemStyle: {
    show: true,
    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
      offset: 0,
      color: '#86bcff'
    }, {
      offset: 1,
      color: '#0d79ff'
    }]),
    barBorderRadius: [100, 100, 0, 0],
    borderWidth: 0
  },
  label: {
    show: true,
    position: 'top',
    textStyle: {
      color: 'white',
      // fontSize: px2(24)
    }
  },
  zlevel: 2,
  barWidth: 11
}
